import logging

class MyLogger(object):
    def __init__(self):
        logging.basicConfig(
            # filename="log.txt",
            level=logging.DEBUG,
            format='[%(levelname)s]   %(message)s')
        self.logger = logging.getLogger(__name__)
        # console = logging.StreamHandler()  # 添加控制台日志输出
        # self.logger.addHandler(console)
    def getLogger(self):
        return self.logger
